package my.soft.aiteacher.teacher.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import my.soft.aiteacher.teacher.pojo.TbLessonPlansDo;
import my.soft.aiteacher.teacher.pojo.TbLessonPlansVo;
import my.soft.aiteacher.teacher.service.ILessonPlansService;
import my.soft.aiteacher.utils.R;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Tag(name = "教师-教案管理",description = "教师-教案管理")
@RestController
public class LessonPlansController {
    @Resource
    private ILessonPlansService lessonPlansService;
    @Operation(summary = "提交教案",description = "提交教案")
    @RequestMapping(value = "/submitLessonPlans",method = RequestMethod.POST)
    public R submitLessonPlans(@RequestBody TbLessonPlansVo lessonPlans){
        lessonPlansService.submitLessonPlans(lessonPlans);
        return R.success("ok");
    }
    @Operation(summary = "查看教案",description = "查看教案")
    @RequestMapping(value = "/LessonPlansList/{teacherId}/getLessonPlans/{fileId}",method = RequestMethod.POST)
    public R LessonPlansList(@PathVariable Long teacherId, @PathVariable Long fileId){
        TbLessonPlansVo tbLessonPlansVo =  lessonPlansService.LessonPlansList(teacherId,fileId);
        return R.success(tbLessonPlansVo);
    }
}
